package com.qqtech.qquan.user.model;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.qqtech.core.common.util.StringUtil;
import com.qqtech.qquan.user.enums.UserConst;

@SuppressWarnings("serial")
public class UserFriendApplyVo extends UserFriendApply{
	
	/**申请人名称**/
	private java.lang.String userName;
	/**申请人头象**/
	private java.lang.String userLogo;
	
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this,
				ToStringStyle.MULTI_LINE_STYLE);
	}

	public java.lang.String getUserName() {
		return userName;
	}

	public void setUserName(java.lang.String userName) {
		this.userName = userName;
	}

	public java.lang.String getUserLogo() {
		return userLogo;
	}

	public void setUserLogo(java.lang.String userLogo) {
		this.userLogo = userLogo;
	}
	
	/**
	 * 申请人头像全URL
	 * example: http://192.168.1.xxx:8080/circle/1.png
	 * @return
	 */
	public java.lang.String getFullUserLogo() {
		if(this.getUserLogo().indexOf("source://")>-1){
			return this.getUserLogo();
		}else if(StringUtil.isBlank(this.getUserLogo())){
			return "";
		}else{
			return super.getImgHandleDomain()+""+this.getUserLogo()+""+UserConst.IMG_POSTFIX;
		}
	}
}